using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class User
{
    int id;

    string name;

    string headImgUrl;

    private List<User> frients;

    public int Id { get => id; set => id = value; }
    public string Name { get => name; set => name = value; }
    public string HeadImgUrl
    {
        get => headImgUrl;
        set => headImgUrl = value;
    }

    public List<User> Frients
    {
        get => frients;
        set => frients = value;
    }

    public User()
    {
        
    }

    public User(int id, string name)
    {
        Id = id;
        Name = name;
    }

    public static User FormString(string msg)
    {
        // return null;
        return new User(int.Parse(msg.Substring(1, msg.IndexOf(","))), msg.Substring(msg.IndexOf(",")+1, msg.Length));
    }
}
